<?php
use think\facade\Route;

//echo '123456:::'.app('http')->getName();die;

// 注册路由
Route::pattern([
    'name' => '\w+',
    'id'   => '\d+',
]);
// Route::get('index/product/id/:id', 'product/detail');
Route::get('product/:id', 'frontend/index/product_detail');
Route::get('news/:id', 'frontend/index/news_detail');